package com.chengqs.rainbow.auth.remote;

import com.chengqs.rainbow.api.account.AccountApi;
import com.chengqs.rainbow.common.security.domain.AccountInfo;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;

/**
 * <B>主类名称：</B>AccountRemote<BR>
 * <B>概要说明：</B>enter<BR>
 *
 * @author: chengqs
 * @create: 2025-09-15 21:44:48
 **/
@Component
public class AccountRemote implements Remote<AccountInfo> {

    @DubboReference(version = "1.0.0")
    private AccountApi accountApi;

    public AccountInfo login(String username, String password) {
        return accountApi.login(username, password);
    }

    @Override
    public AccountInfo loginByMobile(String mobile) {
        return accountApi.loginByMobile(mobile);
    }

    @Override
    public AccountInfo loginByUnionId(String unionId) {
        return accountApi.loginByUnionId(unionId);
    }
}
